<?php
namespace Home\Controller;

use Think\Controller;
use Think\Model;

class TexiaoController extends Controller {

	public function cebianlAction(){

		$this->display();
	}

	public function pingbaoAction()
	{
		$this->display();
	}
	public function tantanAction()
	{
		$this->display();
	}

	public function gwcAction()
	{
		$this->display();
	}

	public function zfbAction()
	{
		$this->display();
	}

	public function layerAction()
	{
		$this->display();
	}

	public function layuiAction()
	{
		$this->display();
	}

	public function searchAction()
	{
		$param = $_GET['param'];
		if(IS_GET && $param =='')
		{
			$this->display();
			return;
		}
		if(IS_GET && $param)
		{
			$user = M('user');
			$where['username'] = array('like',"%$param%");
			$info = $user->where($where)->select();
//			var_dump($info);
			$uname = '';
			foreach($info as $k => $value)
			{
//				$uname .= '<span class="a"><a href="http://www.baidu.com">'.$value['username'].'</a></span>'.'<br>';
				$uname .= '<span class="a">'.$value['username'].'</span>'.'<br>';
			}
			if($uname)
			{
				echo $uname;
			}else{
				echo '没有搜索结果';
			}
		}

	}

}
